<div class="container user">
  <!--header-->
  <div class="row header">
    <div class="col">
      <h1 class="title">找回密码</h1>
    </div>
  </div>
  <!--body-->
  <div class="row body">
    <div class="col-sm-12 col-md-12 col-lg-8 col-xl-6" style="margin: 0 auto;">
      <form action="#" role="form" novalidate [formGroup]="itemForForm" (ngSubmit)="onSubmit(itemForForm)">
        <!--全局消息-->
        <div class="form-group">
          <div class="alert" [ngClass]="formValidSuccess?'alert-success':'alert-danger'" *ngIf="msg">{{msg}}</div>
        </div>
        <!--邮箱-->
        <div class="form-group row">
          <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8">
            <div class="user-field">
              <i class="fa fa-envelope-o fa-lg"></i>
              <input type="text" class="form-control" formControlName="receiver" placeholder="{{placeholder.receiver.title}}">
            </div>
          </div>
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4" [ngSwitch]="waitSeconds">
            <button type="button" class="btn btn-block" *ngSwitchCase="0" [disabled]="itemForForm.controls['receiver'].invalid"
                    (click)="onSentEmail()">获取验证码
            </button>
            <button type="button" class="btn btn-block" *ngSwitchDefault [disabled]="true">{{waitSeconds}}秒</button>
          </div>
        </div>
        <!--验证码-->
        <div class="form-group user-field">
          <i class="fa fa-key fa-lg"></i>
          <input type="text" class="form-control" id="code" formControlName="code" placeholder="{{placeholder.code.title}}">
        </div>
        <!--密码-->
        <div class="form-group user-field">
          <i class="fa fa-key fa-lg"></i>
          <input type="password" class="form-control" id="password" formControlName="pass" placeholder="{{placeholder.pass.title}}">
        </div>
        <!--重复密码-->
        <div class="form-group user-field">
          <i class="fa fa-key fa-lg"></i>
          <input type="password" class="form-control" id="rePass" formControlName="rePass" placeholder="{{placeholder.rePass.title}}">
        </div>
        <!--提交按钮-->
        <div class="form-group">
          <button type="submit" class="btn btn-block btn-info" [disabled]="formBtnDisabled||itemForForm.invalid">找回</button>
        </div>
      </form>
    </div>
  </div>
  <!--bottom-->
  <div class="row bottom">
    <div class="col">
      <a href="#" routerLink="/login">
        <span>登陆</span><i class="fa fa-arrow-circle-o-right"></i>
      </a>
    </div>
  </div>
</div>
